package org.lingshi.security;

import lombok.Getter;
import lombok.Setter;
import org.lingshi.entity.SysUser;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Set;

public class UserSecurity extends User {
    @Getter
    @Setter
    private SysUser sysUser;
    public UserSecurity(SysUser user, Set<GrantedAuthority> authorities){
        super(user.getUsername(),user.getPassword(),
                true,true,true,true,authorities);
        this.sysUser = user;
    }
}
